﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;
namespace Data
{
    public class SQLAccess
    {
        public static string _connectionString = "Data Source=XUANCAU-PC\\SQLEXPRESS;Initial Catalog=QuanLyNhaHang;Integrated Security=True";
        public static DataTable ExecuteQuery(string sql)
        {
            SqlConnection connect = new SqlConnection(_connectionString);
            SqlCommand cm = new SqlCommand();
            cm.Connection = connect;
            cm.CommandText = sql;
            SqlDataAdapter data = new SqlDataAdapter(cm);
            DataTable result = new DataTable();
            data.Fill(result);
            return result;
        }
    }
}
